package tolgahan.albayrak.as3.reflection
{
	public class StaticVariableInfo extends VariableInfo
	{
		public function StaticVariableInfo(xml:XML, baseType:Type, memberIndex:uint)
		{
			super(xml, baseType, memberIndex);
		}
		
		public function get value():*
		{
			return _baseType.classReference[_name];
		}
		
		public function set value(v:*):void
		{
			if(validate(v))
				_baseType.classReference[_name] = v;
		}
		
		override public function getValue(source:Object) : *
		{
			return value;
		}
		override public function setValue(source:Object, v:*, dispatchPropertyChange:Boolean=true) : Boolean
		{
			value = v;
			return validate(v);
		}
		
		override public function toString() : String
		{
			return "public static var " + _name + ":" + _type + " = " + value;
		}
	}
}